# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Poll collectors every {{metrics_report_interval}} seconds
*.period={{metrics_collection_period}}

*.host_in_memory_aggregation = {{host_in_memory_aggregation}}
*.host_in_memory_aggregation_port = {{host_in_memory_aggregation_port}}

{% if has_metric_collector %}

*.timeline.plugin.urls=file:///usr/lib/ambari-metrics-hadoop-sink/ambari-metrics-hadoop-sink.jar
*.sink.timeline.slave.host.name={{hostname}}
accumulo.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
accumulo.period={{metrics_collection_period}}
accumulo.collector.hosts={{ams_collector_hosts}}
accumulo.port={{metric_collector_port}}

jvm.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
jvm.period={{metrics_collection_period}}
jvm.collector.hosts={{ams_collector_hosts}}
jvm.port={{metric_collector_port}}

rpc.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
rpc.period={{metrics_collection_period}}
rpc.collector.hosts={{ams_collector_hosts}}
rpc.port={{metric_collector_port}}

accumulo.sink.timeline.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
accumulo.sink.timeline.period={{metrics_collection_period}}
accumulo.sink.timeline.sendInterval={{metrics_report_interval}}000
accumulo.sink.timeline.collector.hosts={{ams_collector_hosts}}
accumulo.sink.timeline.port={{metric_collector_port}}
accumulo.sink.timeline.instanceId = {{cluster_name}}
accumulo.sink.timeline.set.instanceId = {{set_instanceId}}

# HTTPS properties
accumulo.sink.timeline.truststore.path = {{metric_truststore_path}}
accumulo.sink.timeline.truststore.type = {{metric_truststore_type}}
accumulo.sink.timeline.truststore.password = {{metric_truststore_password}}

{% else %}

accumulo.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
accumulo.sink.ganglia.period=10
accumulo.sink.ganglia.servers={{ganglia_server_host}}:8666

{% endif %}

